package com.link2room.rodimus.service.impl;

import com.link2room.common.dao.ICommonDao;
import com.link2room.rodimus.entity.MallGoodPrice;
import com.link2room.rodimus.service.IMallService;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by LN on 2018/2/7
 */
@Component("mallService")
public class MallServiceImpl implements IMallService {
    @Resource
    private ICommonDao commonDao;

    @Transactional
    @Override
    public void saveMallGoodPrices(List<MallGoodPrice> saveEntitis, Object[] delIds) throws Exception {
        commonDao.saveList(saveEntitis);
        if(null != delIds){
            commonDao.delete(MallGoodPrice.class,delIds);
        }
    }
}
